//
//  MLAFundsPayDetailCell.m
//  MagicLampApp
//
//  Created by Zheng on 2018/12/21.
//  Copyright © 2018 zheng.magic.lamp.app. All rights reserved.
//

#import "MLAFundsPayDetailCell.h"
#import "MLAFundsPayRunWaterModel.h"

@implementation MLAFundsPayDetailCell {
    UILabel *titleLbl;
    UILabel *typeLbl;
    UILabel *moneyLbl;
}

- (void)setModel:(MLAFundsPayRunWaterModel *)model {
    _model = model;
    
    moneyLbl.text = [NSString stringWithFormat:@"%@元",_model.money];
    typeLbl.text = _model.type;
    titleLbl.text = _model.charge_type_name;

}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        titleLbl = [[UILabel alloc] init];
        titleLbl.font = CX_GetNormalFont(12);
        titleLbl.textColor = CX_GetColorTitle();
        [self.contentView addSubview:titleLbl];
        [titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.mas_equalTo(15);
        }];
        
        typeLbl = [[UILabel alloc] init];
        typeLbl.font = CX_GetNormalFont(12);
        typeLbl.textColor = CX_GetColorTitle();
        [self.contentView addSubview:typeLbl];
        [typeLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.mas_equalTo(145);
        }];
        
        moneyLbl = [[UILabel alloc] init];
        moneyLbl.font = CX_GetNormalFont(14);
        moneyLbl.textColor = CX_GetColorRed();
        [self.contentView addSubview:moneyLbl];
        [moneyLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.right.mas_equalTo(-15);
        }];
        
        /*
         测试数据
         moneyLbl.text = @"4000元";
         typeLbl.text = @"支付";
         titleLbl.text = @"保证金";
         */
    }
    return self;
}



@end
